function getSeo($this){
  var time = Date.parse(new Date())/1000;
  axios({
    url: '/offcial/index.php/index/Acticle/seo',
    method: 'post',
  })
    .then(function (response) {
      console.log(response)
      if (response.data.code == 1) {
        var meta=document.getElementsByTagName('meta');
        console.log(11,meta)
        for(var i=0;i<meta.length;i++){
          if(meta[i].getAttribute('name')=='keywords'){
            console.log(1,meta[i]);
            meta[i].setAttribute('content',response.data.data.keyword);
          }
          if(meta[i].getAttribute('name')=='description'){
            meta[i].setAttribute('content',response.data.data.desc);
          }
          document.getElementsByTagName('title')[0].innerText=response.data.data.title
        }
      }else{
        alert(res.data.message)
      }
    })
    .catch(function (response) {
      console.log(response)
    })
}
export default {getSeo};
